export default {
  // 高级搜索状态修改
  upState(state) {
    state.state = !state.state
  },
  // 获取数据总条数
  GoodsGetCount(state, count) {
    state.total = count
  },
  // 切换为编辑页面
  changeAD(state) {
    state.ADType = 'edit'
  },
  // 切换获取数据模式
  changeF(state) {
    state.Ftype = false
  },
  // 商品列表
  Goodslist(state) {
    // 高级搜索初始状态
    state.state = false
    // 头部按钮
    state.btnText = [{
      id: '1',
      textName: '所有商品'
    }, {
      id: '2',
      textName: '商品分类',
      url: '/goods/commodity/commodityClassification'
    }, {
      id: '3',
      textName: '商品导入',
      url: '/goods/commodity/commodityImport'
    }, {
      id: '4',
      textName: '新增商品',
      url: '/goods/commodity/commodityAdd'
    }]
    // 默认增加页面
    state.ADType = 'add'
    // 编辑页面
    state.url = '/goods/commodity/commodityEdit';
    // 页面种类
    state.type = 'goods';
    // 表头
    state.linklist = [{
      id: 0,
      name: "排序",
      isRouter: false,
      width: 50
    }, {
      id: 1,
      name: "商品大类",
      isRouter: false,
      width: 100
    }, {
      id: 2,
      name: "商品小类",
      isRouter: false,
      width: 120
    }, {
      id: 3,
      name: "商品名称",
      isRouter: false,
      width: 120
    }, {
      id: 4,
      name: "商品图",
      isRouter: false
    }, {
      id: 5,
      name: "规格",
      isRouter: false,
      width: 80
    }, {
      id: 6,
      name: "型号",
      isRouter: false,
      width: 80
    }, {
      id: 7,
      name: "商品库存",
      isRouter: false,
      width: 100
    }, {
      id: 8,
      name: "库存状态",
      isRouter: false,
      width: 100
    }, {
      id: 9,
      name: "成本",
      isRouter: false,
      width: 80
    }, {
      id: 10,
      name: "售价",
      isRouter: false,
      width: 80
    }, {
      id: 11,
      name: "商品备注",
      isRouter: false,
      width: 100
    }];
    // 属性
    state.titleList = [
      "goods_sort",//商品排序
      // "gt_id",//商品种类id
      "gt_pno",//商品大类
      "gt_name",//商品小类
      // "goods_id",//商品id
      "goods_name",//商品名称
      "goods_pic",//商品图片
      "goods_descript",//商品规格
      "goods_barcode",//商品型号
      "goods_unit",//商品库存
      "goods_warn_number",//库存警告
      "goods_cost",//商品成本
      "goods_price",//商品售价
      "goods_state",//商品备注
    ]
  },
  // 采购列表
  Purchaselist(state) {
    // 头部按钮
    state.btnText = [{
      id: '1',
      textName: '采购记录'
    }, {
      id: '2',
      textName: '新增采购',
      url: '/goods/purchase/purchaseAdd'
    }]
    // 默认增加页面
    state.ADType = 'add'
    // 编辑页面
    state.url = '/goods/purchase/purchaseEdit';
    // 页面种类
    state.type = 'purchase';
    // 表头
    state.linklist = [{
      id: 0,
      name: "商品名称",
      isRouter: false,
      width: 100
    }, {
      id: 1,
      name: "原有库存",
      isRouter: false,
      width: 100
    }, {
      id: 2,
      name: "采购数量",
      isRouter: false,
      width: 100
    }, {
      id: 3,
      name: "存放仓库",
      isRouter: false,
      width: 100
    }, {
      id: 4,
      name: "供应商",
      isRouter: false,
      width: 100
    }, {
      id: 5,
      name: "单价",
      isRouter: false,
      width: 100
    }, {
      id: 6,
      name: "总折扣",
      isRouter: false,
      width: 100
    }, {
      id: 7,
      name: "总成本",
      isRouter: false,
      width: 100
    }, {
      id: 8,
      name: "总运费",
      isRouter: false,
      width: 100
    }, {
      id: 9,
      name: "支付方式",
      isRouter: false,
      width: 100
    }, {
      id: 10,
      name: "备注",
      isRouter: false,
      width: 100
    }, {
      id: 11,
      name: "经办人",
      isRouter: false,
      width: 100
    }, {
      id: 12,
      name: "信息录入",
      isRouter: false,
      width: 100
    }, {
      id: 13,
      name: "采购日期",
      isRouter: false,
      width: 150
    }];
    // 属性
    state.titleList = [
      // 'pur_id', //采购id
      // 'goods_cost', //商品成本
      // 'goods_price', //商品售价
      'goods_name', //商品名称
      'original_inventory', //原库存
      'pur_numb', //采购数量
      'storage_name', //仓库名称
      'su_name', //供应商
      'pur_price', //单价
      'discount', //折扣
      'pur_numb_price', //总成本
      'pur_freight', //总运费
      'pay_name', //支付方式
      'pur_remark', //备注
      'employee_name', //经办人
      'recorder', //信息录入人
      'pur_time', //采购日期
    ]
  },
  // 供货商列表
  supplierlist(state) {
    // 高级搜索初始状态
    state.state = false
    // 头部按钮
    state.btnText = [{
      id: '1',
      textName: '供货商列表',
      type: 'reshow'
    }, {
      id: '2',
      textName: '新增供货商',
      url: '/goods/supplier/supplierAdd'
    }];
    // 默认增加页面
    state.ADType = 'add'
    // 编辑页面
    state.url = '/goods/supplier/supplierEdit';
    // 页面种类
    state.type = 'supply';
    // 表头
    state.linklist = [{
      id: 0,
      name: "合作情况",
      isRouter: false,
      width: 100
    }, {
      id: 1,
      name: "供应商名称",
      isRouter: false,
      width: 100
    }, {
      id: 2,
      name: "联系人",
      isRouter: false,
      width: 100
    }, {
      id: 3,
      name: "电话",
      isRouter: false,
      width: 100
    }, {
      id: 4,
      name: "手机号",
      isRouter: false,
      width: 120
    }, {
      id: 5,
      name: "QQ",
      isRouter: false,
      width: 120
    }, {
      id: 6,
      name: "省份",
      isRouter: false,
      width: 80
    }, {
      id: 7,
      name: "城市",
      isRouter: false,
      width: 200
    }, {
      id: 8,
      name: "地址",
      isRouter: false,
      width: 200
    }, {
      id: 9,
      name: "备注",
      isRouter: false,
      width: 80
    }, {
      id: 10,
      name: "添加时间",
      isRouter: false
    },];
    // 属性
    state.titleList = [
      // "su_id",//供应商id
      "su_cooperation",//合作情况
      "su_name",//供应商名称
      "su_contact",//联系人
      "su_phone",//电话
      "su_tel",//手机号
      "su_qq",//QQ号
      "su_pro",//省份
      "su_city",//城市
      "su_address",//地址
      "su_remark",//备注
      "su_add_date",//添加日期
      // "su_fax",//传真
      // "su_we",//微信号
      // "su_email",//邮箱
      // "su_web",//网址
      // "su_status"//状态
    ]
  },
  // 仓库列表
  Storelist(state) {
    // 头部按钮
    state.btnText = [{
      id: '1',
      textName: '仓库列表'
    }, {
      id: '2',
      textName: '新增仓库',
      url: '/goods/warehouse/warehouseAdd'
    }];
    // 默认增加页面
    state.ADType = 'add';
    // 编辑页面
    state.url = '/goods/warehouse/warehouseEdit';
    // 页面种类
    state.type = 'store_house';
    // 表头
    state.linklist = [{
      id: 0,
      name: "仓库名称",
      isRouter: false,
      width: 180
    }, {
      id: 1,
      name: "负责人",
      isRouter: false,
      width: 180
    }, {
      id: 2,
      name: "电话",
      isRouter: false,
      width: 200
    }, {
      id: 3,
      name: "备注",
      isRouter: false,
      width: 250
    }];
    // 属性
    state.titleList = [
      // "sh_id",//仓库id
      "storage_name",//仓库名
      "responsible",//负责人
      "sh_phone",//电话
      "sh_comment",//备注
      // "sh_status"//状态
    ]
  },
  // 销售记录列表
  SalesRecordlist(state) {
    // 页面种类
    state.type = 'order_goods';
    // 表头
    state.linklist = [{
      id: 0,
      name: "订单",
      isRouter: false,
      width: 80
    }, {
      id: 1,
      name: "客户名称",
      isRouter: false,
      width: 120
    }, {
      id: 2,
      name: "商品名称",
      isRouter: false,
      width: 120
    }, {
      id: 3,
      name: "商品图",
      isRouter: false,
    }, {
      id: 4,
      name: "销售数量",
      isRouter: false,
      width: 80
    }, {
      id: 5,
      name: "折扣",
      isRouter: false,
      width: 80
    }, {
      id: 6,
      name: "总金额",
      isRouter: false,
      width: 80
    }, {
      id: 7,
      name: "备注",
      isRouter: false,
      width: 100
    }, {
      id: 8,
      name: "销售员",
      isRouter: false,
      width: 100
    }, {
      id: 9,
      name: "销售时间",
      isRouter: false,
      width: 150
    }];
    // 属性
    state.titleList = [
      "order_id",//订单编号
      "customer_Name",//客户名称
      "goods_name",//商品名称
      "goods_pic",//商品图片
      "order_goods_count",//销售数量
      "discount",//折扣
      "",//总金额
      "order_goods_remark",//备注
      "employee_name",//销售员
      "order_goods_date",//日期
    ]
  },
}